package com.jdk7.mo.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.io.Serializable;

//@Table(name = "student")
@Entity
public class Student extends Person implements Serializable {
    @Column
    private String school;
    @Column
    private String homeAddress;
    @Column
    private String grade;

    public Student() { }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    public String getHomeAddress() {
        return homeAddress;
    }

    public void setHomeAddress(String homeAddress) {
        this.homeAddress = homeAddress;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    @Override //id,name,sex,birthDate,homeAddress,school,grade
    public String toString() {
        return " [id=" + this.getId() + ", name=" + this.getName() + ", sex=" + this.getSex()
                + ", birth_date=" + this.getBirthDate() + ", home_address=" + this.getHomeAddress()
                + ", school=" + this.getSchool() + ", grade=" + this.getGrade()
                + ", update_time=" + this.getUpdateTime() + ", create_time=" + this.getCreateTime() + "]";
    }
}
